package com.jing.yao.bean;

import com.jing.yao.config.BaseConfigurationBean;
import com.jing.yao.security.JwtTokenAuthenticationFilter;
import com.jing.yao.security.YaoUserDetailsService;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;

/**
 * 用户服务将Bean注入Spring配置
 * Import引入基础包的Bean配置
 *
 * @author lirui
 * @since 2020-06-21
 */
@Configuration
@Import(BaseConfigurationBean.class)
public class UserAutoConfiguration {

    @Bean
    public JwtTokenAuthenticationFilter jwtTokenAuthenticationFilter() {
        return new JwtTokenAuthenticationFilter();
    }

    @Bean
    public YaoUserDetailsService customUserDetailsService() {
        return new YaoUserDetailsService();
    }
}
